﻿using ImageManager.Model;

namespace ImageManager.DBAccess.AOP
{
    public class BeforeSaveEventArgs<T> : EventArgs where T : BaseModel, new()
    {
        public BeforeSaveEventArgs(T data,T dataInDB) 
        {
            this.Data = data;
            this.DataInDb = dataInDB;
        }
        public T Data { get; set; }
        public T DataInDb { get; set; }
        public bool Cancle { get; set; }
        public string Message { get; set; }
    }
    public class BeforeDeleteEventArgs<T> : EventArgs where T : BaseModel, new()
    {
        public BeforeDeleteEventArgs(T data)
        {
            this.Data = data;
        }
        public T Data { get; set; }
        public bool Cancle { get; set; }
        public string Message { get; set; }
    }
}
